{% extends "debian-base.html" %}
{% load i18n %}

{% block title %}Debian New Member Process{% endblock %}

{% block head_meta %}
<link rev="made" href="mailto:nm@debian.org">
<meta name="Author"   content="Enrico Zini, enrico@debian.org">
{% endblock %}

{% block head_resources %}
  {{block.super}}
  <link type="text/css" rel="stylesheet" media="all" href="{{ STATIC_URL }}css/nm.css">
  {% if visitor.is_admin %}
  <script src="{{STATIC_URL}}js/jquery-1.10.2.min.js"></script>
  <script type="text/javascript">
(function($){
function ganneff_mode() {
  $("button").text("DELETE!!!!");
  $("a").each(function(idx, el) {
    console.log("A", el)
    var el = $(el);
    var label = el.text();
    if (/^(\[|admin|impersonate|add|edit)/.test(label))
      el.text("DELETE!!!!");
  });
}
function main()
{
  $("#logo").click(function(evt) {
    ganneff_mode();
    evt.preventDefault();
    return false;
  });
}
$(main);
})(jQuery);
  </script>
  {% endif %}
{% endblock %}

{% block section %}<a href="{% url 'home' %}">NM</a>{% endblock %}

{% block searchbox %}
{% comment %}No search feature in NM site yet{% endcomment %}
{% endblock %}

{% block navbar %}
  <li><a href="{% url 'public_findperson' %}">People</a></li>
  <li><a href="{% url 'managers' %}">Managers</a></li>
  <li><a href="{% url 'process_list' %}">Applicants</a></li>
  <li><a href="http://wiki.debian.org/Keysigning">Keysigning</a></li>
  <li><a href="{% url 'root_faq' %}">Site FAQ</a></li>
  <li><a href="{% url 'wizard_home' %}">Site wizard</a></li>
  {% if wikihelp %}<li><a href="{{wikihelp}}">Wiki help<a/a></li>{% endif %}
{% endblock %}

{% block breadcrumbs %}{% if impersonator %}<a href="{% url 'impersonate' %}?url={{request.build_absolute_uri}}">[{{impersonator}} as {{visitor.lookup_key}}]</a> {% endif %}<a href="{% url 'home' %}">nm</a>
{% if person %} / {{person.a_link}}{% endif %}
{% if process %} / {{process.a_link}}{% endif %}
{% if requirement %} / {{requirement.a_link}}{% endif %}
{% endblock %}

{% block relatedpages %}
{% if requirement %}
  {% if visitor.is_admin %}<a href="{{requirement.get_admin_url}}">admin requirement</a>{% endif %}
{% endif %}
{% if process %}
  {% if visitor.is_admin %}<a href="{{process.get_admin_url}}">admin process</a>{% endif %}
{% endif %}
{% if person %}
  <a href="{{person.get_ddpo_url}}">DDPO</a>
  <a href="{{person.get_portfolio_url}}">Portfolio</a>
  {% if person.get_contributors_url %}<a href="{{person.get_contributors_url}}">Contributor</a>{% endif %}
  {% if visitor %}<a href="{% url 'restricted_minechangelogs' key=person.lookup_key %}">changelogs</a>{% endif %}
  {% if visitor.is_admin %}<a href="{{person.get_admin_url}}">admin person</a>{% endif %}
  {% if visitor.is_admin and person.can_become_am %}<a href="{% url 'admin:backend_am_add' %}?person={{person.id}}">make am</a>{% endif %}
  {% if visitor != person and visitor.is_admin %}<a href="{% url 'impersonate' key=person.lookup_key %}?url={{request.build_absolute_uri}}">impersonate</a>{% endif %}
{% endif %}

{% if user.is_anonymous %}
 {% if request.sso_username %}
  {{request.sso_username}} (not known to this site yet) <a href="{% url 'dm_claim' %}">claim account</a>
 {% else %}
  <a href="https://wiki.debian.org/DebianSingleSignOn#Debian_SSO_documentation">login</a>
 {% endif %}
{% else %}
 {% if visitor.is_am %}
  <a href="{% url 'restricted_ammain' %}">am dashboard</a>
 {% endif %}
 <a href="{{visitor.get_absolute_url}}">{{visitor.lookup_key}}</a>
{% endif %}

{% comment %}
    <a href="{% url 'search_packages' %}">Search</a>
    <a href="{% url 'report_todo' %}">TODO list</a>
    <a href="{% url 'editor_index' %}">Editor</a>
    <a href="{% url 'statistics' %}">Statistics</a>
{% endcomment %}
{% endblock %}

{% block content %}
<h1>Debian NM Website Template</h1>
{% endblock %}

{% block footer %}
<p><span>Copyright © 2012 Enrico Zini &lt;enrico@debian.org&gt;. See <a href="{% url 'root_license' %}">license terms</a>.
Source code is <a href="https://anonscm.debian.org/git/nm/nm2.git">available</a>.
Please report bugs against the <a href="http://bugs.debian.org/nm.debian.org">nm.debian.org</a> pseudo-package.
</span>
{% include "nm-langs_snippet.html" %}
</p>
{% endblock %}
